package com.gy.edu.examination.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.gy.edu.R;

/**
 * Created by 高岳 on 2016/12/24.
 * Describe:
 */
public class ExaminationAskAdapter extends BaseAdapter {

    private Context context;

    public ExaminationAskAdapter(Context context){
        this.context = context;
    }

    @Override
    public int getCount() {
        return 2;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = View.inflate(context, R.layout.adapter_examination_ask,null);
        ImageView img = (ImageView) convertView.findViewById(R.id.ask_img_flag);
        TextView tvEnd = (TextView) convertView.findViewById(R.id.ask_tv_end);
        if(position == 1){
            img.setImageResource(R.mipmap.ask);
            tvEnd.setVisibility(View.GONE);
        }
        return convertView;
    }
}
